package com.ls.lserp.modules.material.dao;


import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.modules.material.entity.InventoryRequest;
import com.ls.lserp.modules.material.entity.InventoryRequestEx;
import com.ls.lserp.modules.material.entity.MaterialRequestEx;
import com.ls.lserp.modules.material.entity.RequestExMaterial;
import com.ls.lserp.modules.order.entity.StyleOptionEntity;
import com.ls.lserp.modules.trade.entity.Enchase;

/**
 * @ClassName: InventoryRequest
 * @Description: 分类接口
 * 
 * @author 
 * @date 2017年04月14日 
 *
 */

@MyBatisDao
public interface InventoryRequestExDao extends CrudDao<InventoryRequestEx>{
	/**
	  * @Title: findRequestDetail
	  * @Description: 出库申请明细
	  * @param @param inventoryRequest
	  * @param @return
	  * @return List<InventoryRequestEx> 
	  * @throws
	  */
	public List<InventoryRequestEx> findRequestDetail(InventoryRequestEx inventoryRequestEx);
	
	/**
	  * @Title: findBrandList
	  * @Description: 生产制单
	  * @param @param inventoryRequest
	  * @param @return
	  * @return List<InventoryRequest> 
	  * @throws
	  */
	public List<InventoryRequestEx> findProductionList();
	/**
	 * 获取生产制单相关信息
	 * @param inventoryRequest
	 * @return
	 */
	public InventoryRequestEx getProductionInfo(InventoryRequestEx inventoryRequestEx);
	/**
	 * 入库申请单
	 * @param inventoryRequest
	 * @return
	 */
	public int insertInventoryRequest(InventoryRequestEx inventoryRequestEx);
	
	/**
	 * 入库申请单详细
	 * @param inventoryRequest
	 * @return
	 */
	public int insertInventoryRequestDetails(InventoryRequestEx inventoryRequestEx);
	
	/**
	  * @Title: deleteRequestDetails
	  * @Description: 物理删除入库申请明细
	  * @param @param inventoryRequest
	  * @param @return
	  * @return int 
	  * @throws
	  */
	public int deleteRequestDetails(InventoryRequestEx inventoryRequestEx);
	
	/**
	  * @Title: updateInventoryRequest
	  * @Description: 更新入库申请
	  * @param @param inventoryRequest
	  * @param @return
	  * @return int 
	  * @throws
	  */
	public int updateInventoryRequest(InventoryRequestEx inventoryRequestEx);
	
	/**
	  * @Title: findRequestDetailsList
	  * @Description: 面辅料
	  * @param @param inventoryRequest
	  * @param @return
	  * @return List<InventoryRequest> 
	  * @throws
	  */
	public List<InventoryRequestEx> findMaterial(InventoryRequestEx inventoryRequestEx);
	
	/**
	  * @Title: findRequestMaterial
	  * @Description: 面辅料
	  * @param @param requestExMaterial
	  * @param @return
	  * @return List<RequestExMaterial> 
	  * @throws
	  */
	public List<RequestExMaterial> findRequestMaterial(RequestExMaterial requestExMaterial);
	
	/**
	  * @Title: findRequestMaterial
	  * @Description: 面辅料
	  * @param @param requestExMaterial
	  * @param @return
	  * @return List<RequestExMaterial> 
	  * @throws
	  */
	public List<MaterialRequestEx> findEXMaterial(RequestExMaterial requestExMaterial);
	
	/**
     * 获取定制合同小信息 
     * 
     * @return
     */
    public List<StyleOptionEntity> findContractInfo();
    
    /**
     * 获取出库申请待出库数量
     * @param requestExMaterial
     * @return
     */
    public int getNotOutboundNum(InventoryRequestEx inventoryRequestEx);
    
    InventoryRequestEx getByContractIdAndStatus(InventoryRequestEx inventoryRequestEx);
}
